package org.byqh.dqeai.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import org.byqh.dqeai.common.Json;
import org.byqh.dqeai.dto.common.IPage;
import org.byqh.dqeai.entity.SysAppCategory;
import org.byqh.dqeai.entity.proxy.SysAppCategoryProxy;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/sysAppCategory")
@Tag(name = "系统[SysAppCategory] - 应用分类管理")
public class SysAppCategoryController extends BaseController<SysAppCategory, SysAppCategoryProxy> {
    /**
     * 分页查询数据
     */
    @PostMapping(value = "/list")
    public Json<IPage<SysAppCategory>> list(@RequestParam(defaultValue = "1") Integer page,
                                            @RequestParam(defaultValue = "10") Integer size,
                                            @RequestParam(defaultValue = "", required = false) String sort,
                                            @RequestBody(required = false) SysAppCategory dto) {

        return Json.success(new IPage<>(page, size, this.page(page, size).getData()));
    }
}